<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">&times;</button>
    <p class="modal-title panel-title-size">添加仓库</p>
</div>
<div class="modal-body panel-body">
    <form class="form-horizontal form-validation" name="addHostForm">
        <div class="form-group">
            <div class="col-lg-12">
                <label class="col-lg-2 control-label">仓库名称：</label>
                <div class="col-lg-10 control-input">
                    <input type="text" name="hostname" class="form-control" ng-model="registryName" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-lg-12">
                <label class="col-lg-2 control-label">仓库主机：</label>
                <div class="col-lg-10 control-input">
                    <select class="form-control" ng-change="change(type)" ng-model="type">
                        <option ng-repeat="x in types" value="{{x.hostId}}">{{x.hostIp}}</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-lg-12">
                <label class="col-lg-2 control-label">仓库高可用：</label>
                <div class="checkbox check-top app_radio_div">
                    <label class="i-checks">
                        <input type="checkbox" id="highId" ng-click="isHigh()">
                        <i></i>
                    </label>
                </div>
            </div>
        </div>
        <div id="showHigh" style="display: none;">
            <div class="form-group">
                <div class="col-lg-12">
                    <label class="col-lg-2 control-label">备用主机：</label>
                    <div class="col-lg-10 control-input">
                        <select class="form-control" ng-change="change(standby)" ng-model="standby">
                            <option ng-repeat="x in standbys" value="{{x.hostId}}">{{x.hostIp}}</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-lg-12">
                    <label class="col-lg-2 control-label">高可用地址：</label>
                    <div class="col-lg-10 control-input">
                        <input type="text" name="serviceIp" class="form-control" ng-model="serviceIp" maxlength="64" maxlength-error-message="最多输入64个字符">
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button type="submit" class="btn btn-primary" validation-submit="addHostForm" ng-disabled="addHostForm.$invalid" ng-click="ok()">确认</button>
    <button class="btn btn-default" ng-click="cancel()">取消</button>
</div>